<Project Sdk="Microsoft.NET.Sdk">

    <PropertyGroup>
        <TargetFrameworks>net45;netcoreapp2.0</TargetFrameworks>
        <GeneratePackageOnBuild>true</GeneratePackageOnBuild>
        <Version>4.2.1</Version>
        <Authors>LENS authors</Authors>
        <PackageId>LENS</PackageId>
        <Description>Language for Embeddable .NET Scripting</Description>
        <PackageTags>lens embeddable script</PackageTags>
        <PackageLicenseExpression>MIT</PackageLicenseExpression>
        <PackageProjectUrl>https://github.com/impworks/lens</PackageProjectUrl>
        <Copyright>Copyright 2018</Copyright>
        <LangVersion>7.3</LangVersion>
    </PropertyGroup>

    <Choose>
        <When Condition="$(TargetFramework.StartsWith('netcoreapp'))">
            <PropertyGroup>
                <DefineConstants>NET_CORE</DefineConstants>
            </PropertyGroup>
            <ItemGroup>
                <PackageReference Include="Microsoft.CSharp" Version="4.4.1" />
                <PackageReference Include="System.Reflection.Emit.ILGeneration" Version="4.3.0" />
            </ItemGroup>
        </When>
        <Otherwise>
            <PropertyGroup>
                <DefineConstants>NET_CLASSIC</DefineConstants>
            </PropertyGroup>
            <ItemGroup>
                <Reference Include="Microsoft.CSharp" />
                <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" />
            </ItemGroup>
        </Otherwise>
    </Choose>

    <ItemGroup>
        <Compile Update="Translations\CompilerMessages.Designer.cs">
            <DesignTime>True</DesignTime>
            <AutoGen>True</AutoGen>
            <DependentUpon>CompilerMessages.resx</DependentUpon>
        </Compile>
        <EmbeddedResource Update="Translations\CompilerMessages.resx">
            <Generator>PublicResXFileCodeGenerator</Generator>
            <LastGenOutput>CompilerMessages.Designer.cs</LastGenOutput>
        </EmbeddedResource>
    </ItemGroup>

    <ItemGroup>
        <Compile Update="Translations\LexerMessages.Designer.cs">
            <DesignTime>True</DesignTime>
            <AutoGen>True</AutoGen>
            <DependentUpon>LexerMessages.resx</DependentUpon>
        </Compile>
        <EmbeddedResource Update="Translations\LexerMessages.resx">
            <Generator>PublicResXFileCodeGenerator</Generator>
            <LastGenOutput>LexerMessages.Designer.cs</LastGenOutput>
        </EmbeddedResource>
    </ItemGroup>

    <ItemGroup>
        <Compile Update="Translations\ParserMessages.Designer.cs">
            <DesignTime>True</DesignTime>
            <AutoGen>True</AutoGen>
            <DependentUpon>ParserMessages.resx</DependentUpon>
        </Compile>
        <EmbeddedResource Update="Translations\ParserMessages.resx">
            <Generator>PublicResXFileCodeGenerator</Generator>
            <LastGenOutput>ParserMessages.Designer.cs</LastGenOutput>
        </EmbeddedResource>
    </ItemGroup>

</Project>
